package springIoc.test02;

import springIoc.TestDao;

public class TestDIserviceImpl implements  TestDIservice {
    private TestDao testDao;
    //构造方法。用于实现依赖注入接口对象testDao
    public TestDIserviceImpl(TestDao testDao) {
        super();
        this.testDao =testDao;
    }

    @Override
    public void sayHello() {
        //调用testDao里面的sayHello方法
        testDao.sayHello();
        System.out.println("在TestDIserviceImpl说Hello spring");
    }
}
